-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style engine: pass CSS formatting options from global functions #43886
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tter control testing and allow user overrides.
ramonjd
added
[Type] Enhancement
A suggestion for improvement.
[Package] Style Engine
/packages/style-engine
labels
Sep 6, 2022
This was referenced Sep 6, 2022
aristath
approved these changes
Sep 6, 2022
andrewserong
approved these changes
Sep 6, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, LGTM too! ✨
ramonjd
added a commit
to ramonjd/wordpress-develop
that referenced
this pull request
Sep 6, 2022
ramonjd
added a commit
to ramonjd/wordpress-develop
that referenced
this pull request
Sep 7, 2022
ramonjd
added a commit
to ramonjd/wordpress-develop
that referenced
this pull request
Sep 8, 2022
ramonjd
added a commit
to ramonjd/wordpress-develop
that referenced
this pull request
Sep 8, 2022
ramonjd
added a commit
to ramonjd/wordpress-develop
that referenced
this pull request
Sep 9, 2022
ramonjd
added a commit
to ramonjd/wordpress-develop
that referenced
this pull request
Sep 9, 2022
andrewserong
pushed a commit
that referenced
this pull request
Sep 14, 2022
) * Initial commit. Adding further documentation, cleaning up changelog ready to populate with real changes :P * Typos, formatting * Typos, formatting * Sorting out change log and formatting * Remove enqueue option. It does nothing. * Update packages/style-engine/docs/using-the-style-engine-with-block-supports.md No empty lines! :D Co-authored-by: Ari Stathopoulos <[email protected]> * Update README.md typo * Updating manifest.json to include new style engine docs Splitting the global functions out of the class files Checking for the directory when loading rather than each individual file * Adding type annotation * Updating CHANGELOG.md * Updated version to prerelease Reverted JS comments for TS types and rebuilt docs Removed style engine from bundle exception array * Rebase after #43886 * Updating change logs and emphasizing that new global JS methods are available since 6.1 * Checking for functions and classes in tests so that Gutenberg tests don't fail during the backport to Core. This is valid for 6.1. After that, developing the packages might require another solution, such as testing against `gutenberg_` prefixed functions. * Formatting PHP doc comments and params that describe associative arrays Updating test function names and annotations. * Formatting * Combining tests for get_declarations_string Updating php doc params * Adding message parameter to assertions where more than one assertion is used in a test method. * Updating PHP docs Testing for WP_Style_Engine_CSS_Rules_Store in WP_Style_Engine_Processor->add_store * Text domain added to __() * Refactoring sanitization tests for CSS declarations Counting calls to mock filters executed in safecss_filter_attr() (kses.php) * Formatting styleEngine tests Removing duplicated test (we were already testing context below) * My blod is typo * Active voice rather than imperative * Remove Gutenberg suffix * Adding message to script loader block support enqueuing expectations * Grammar, formatting, removing class_exists checks * Ignore unused variable. This is a common test pattern in Core. * Remove unusued var in tests Co-authored-by: Ari Stathopoulos <[email protected]>
cbravobernal
pushed a commit
that referenced
this pull request
Sep 14, 2022
) * Initial commit. Adding further documentation, cleaning up changelog ready to populate with real changes :P * Typos, formatting * Typos, formatting * Sorting out change log and formatting * Remove enqueue option. It does nothing. * Update packages/style-engine/docs/using-the-style-engine-with-block-supports.md No empty lines! :D Co-authored-by: Ari Stathopoulos <[email protected]> * Update README.md typo * Updating manifest.json to include new style engine docs Splitting the global functions out of the class files Checking for the directory when loading rather than each individual file * Adding type annotation * Updating CHANGELOG.md * Updated version to prerelease Reverted JS comments for TS types and rebuilt docs Removed style engine from bundle exception array * Rebase after #43886 * Updating change logs and emphasizing that new global JS methods are available since 6.1 * Checking for functions and classes in tests so that Gutenberg tests don't fail during the backport to Core. This is valid for 6.1. After that, developing the packages might require another solution, such as testing against `gutenberg_` prefixed functions. * Formatting PHP doc comments and params that describe associative arrays Updating test function names and annotations. * Formatting * Combining tests for get_declarations_string Updating php doc params * Adding message parameter to assertions where more than one assertion is used in a test method. * Updating PHP docs Testing for WP_Style_Engine_CSS_Rules_Store in WP_Style_Engine_Processor->add_store * Text domain added to __() * Refactoring sanitization tests for CSS declarations Counting calls to mock filters executed in safecss_filter_attr() (kses.php) * Formatting styleEngine tests Removing duplicated test (we were already testing context below) * My blod is typo * Active voice rather than imperative * Remove Gutenberg suffix * Adding message to script loader block support enqueuing expectations * Grammar, formatting, removing class_exists checks * Ignore unused variable. This is a common test pattern in Core. * Remove unusued var in tests Co-authored-by: Ari Stathopoulos <[email protected]>
ockham
pushed a commit
that referenced
this pull request
Sep 19, 2022
) * Initial commit. Adding further documentation, cleaning up changelog ready to populate with real changes :P * Typos, formatting * Typos, formatting * Sorting out change log and formatting * Remove enqueue option. It does nothing. * Update packages/style-engine/docs/using-the-style-engine-with-block-supports.md No empty lines! :D Co-authored-by: Ari Stathopoulos <[email protected]> * Update README.md typo * Updating manifest.json to include new style engine docs Splitting the global functions out of the class files Checking for the directory when loading rather than each individual file * Adding type annotation * Updating CHANGELOG.md * Updated version to prerelease Reverted JS comments for TS types and rebuilt docs Removed style engine from bundle exception array * Rebase after #43886 * Updating change logs and emphasizing that new global JS methods are available since 6.1 * Checking for functions and classes in tests so that Gutenberg tests don't fail during the backport to Core. This is valid for 6.1. After that, developing the packages might require another solution, such as testing against `gutenberg_` prefixed functions. * Formatting PHP doc comments and params that describe associative arrays Updating test function names and annotations. * Formatting * Combining tests for get_declarations_string Updating php doc params * Adding message parameter to assertions where more than one assertion is used in a test method. * Updating PHP docs Testing for WP_Style_Engine_CSS_Rules_Store in WP_Style_Engine_Processor->add_store * Text domain added to __() * Refactoring sanitization tests for CSS declarations Counting calls to mock filters executed in safecss_filter_attr() (kses.php) * Formatting styleEngine tests Removing duplicated test (we were already testing context below) * My blod is typo * Active voice rather than imperative * Remove Gutenberg suffix * Adding message to script loader block support enqueuing expectations * Grammar, formatting, removing class_exists checks * Ignore unused variable. This is a common test pattern in Core. * Remove unusued var in tests Co-authored-by: Ari Stathopoulos <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Allowing passing 'prettify' option from global functions.
Why?
So we can better control testing and allow user overrides.
For example, core tests have
SCRIPT_DEBUG
enabled so we'd want to be able to override this for unit testing.See: WordPress/wordpress-develop#3199
Testing Instructions
The tests should pass!